#pragma once
#include <span>

template <typename T>
void selectSort(std::span<T> container) {
	auto len = container.size();

	for (auto i = 0u; i < len; i++) {
		size_t min_index = i;
		for (auto j = i + 1; j < len; j++) {
			min_index = container[min_index] > container[j] ? j : min_index;
		}

		std::swap(container[i], container[min_index]);
	}
}

